// 导入变量和混入
@import './variables.scss';
@import './mixins.scss';

// 重置样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  line-height: 1.5;
  color: var(--el-text-color-primary);
  background-color: var(--el-bg-color-page);
}

// 链接样式
a {
  color: $primary-color;
  text-decoration: none;
  transition: color 0.3s ease;
  
  &:hover {
    color: mix(white, $primary-color, 20%);
  }
}

// 图片样式
img {
  max-width: 100%;
  height: auto;
}

// 滚动条样式
html {
  @include scrollbar;
}

// 过渡动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

// 工具类
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.flex-center {
  @include flex-center;
}

.flex-between {
  @include flex-between;
}

.clearfix {
  @include clearfix;
}

// 响应式容器
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: $spacing-md;
  padding-left: $spacing-md;
  
  @include respond-to(sm) {
    max-width: $container-width-sm;
  }
  
  @include respond-to(md) {
    max-width: $container-width-md;
  }
  
  @include respond-to(lg) {
    max-width: $container-width-lg;
  }
  
  @include respond-to(xl) {
    max-width: $container-width-xl;
  }
  
  @include respond-to(xxl) {
    max-width: $container-width-xxl;
  }
}